1. /* sxbscvds.cpp by K.Tsuru */
  2. // function ID 3557 BRADIX
  3. /***************************************************************
  4. SN library
  5. SDecimal class
  6. BRADIX ---> DRADIX radix conversion
  7. A radix conversion by binary splitting method ver. 2.31
  8. ***************************************************************/
  9. #ifndef SN_H
  10. #include "sn.h"
  11. #endif
  12. static const fType* pf;
  13. class BSConvSDecimalToSDouble : public BinarySplittingA1C<SLong> {
  14. public:
  15. BSConvSDecimalToSDouble(long upto, long precision) : BinarySplittingA1C<SLong>(upto, precision){
  16. putTogether();
  17. }
  18. void setAC(long k, SLong& a, SLong& c) {
  19. a.SetInt(pf[k]);
  20. c = k ? BRADIX : ONE;
  21. }
  22. };
  23. SDouble BS_ConvSDecToSDbl(const SDecimal& x) {
  24. pf = x.ReadFigures();
  25. SDouble temp;
  26. long prec = long(temp.Size()) * DFIGURES;
  27. long L = x.Last();
  28. BSConvSDecimalToSDouble s(L, prec);
  29. return s.getValue();
  30. }

sxbscvds.cpp : last modifiled at 2017/11/06 11:03:07(904 bytes)
created at 2017/11/06 15:57:02
The creation time of this html file is 2017/11/06 16:00:48 (Mon Nov 06 16:00:48 2017).